//banner切换
var SwiperBanner=new Swiper('.banner', {
    slidesPerView: 1,
    spaceBetween: 10,
    loop: true,
    autoplay: {
        delay: 5000,
        stopOnLastSlide: false,
        disableOnInteraction: true
    },
    pagination: {
        el: '.swiper-pagination',
        clickable: true
    }
});
//侧滑菜单效果
var app_header = new Vue({
    el: '#header',
    data: {
        isShowMenu: false,
        isShowQrcode:false,
        showQrcodeHeight:210
    },
    methods: {},
    created:function(){
        this.showQrcodeHeight=$(window).height()-58-250;
    }
});
//供应链
var SwiperGyl=new Swiper('.swiper-gyl', {
    slidesPerView: 'auto',
    centeredSlides: true,
    spaceBetween: 15,
    loop: true,
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev'
    }
});
//合作伙伴
var SwiperHzhb=new Swiper('.swiper-hzhb', {
    slidesPerView: 'auto',
    centeredSlides: true,
    spaceBetween: 15,
    loop: true,
    navigation: {
        nextEl: '.swiper-button-next',
        prevEl: '.swiper-button-prev'
    }
});
$(function () {
    $('img').css('max-width','100%');
    //公司简介视频播放
    var oVideo = document.getElementById('videoSource');
    $('.video-btn').click(function () {
        $('.about-video img').hide();
        $('.about-video video').show();
        oVideo.play();
    });
    //锚链接平滑滚动
    $('a[href*=#],area[href*=#]').click(function() {
        if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                $('html,body').animate({
                    scrollTop: targetOffset
                },1000);
                return false;
            }
        }
    });
});